package dtudyGenericity;

import java.util.Arrays;

public class TestClass<S> {

    Object[] obj = new Object[3];
    int size;

    public boolean add(S s) {
        obj[size] = s;
        size++;
        return true;
    }

    public S get(int index) {
        return (S) obj[index];
    }

    @Override
    public String toString() {
        return Arrays.toString(obj);
    }
}
